﻿<UserControl x:Class="SQLServerOptimizer.PL.WPF.OverviewReportsControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
            xmlns:viewer="clr-namespace:Microsoft.Reporting.WinForms;assembly=Microsoft.ReportViewer.WinForms"
            	
             mc:Ignorable="d" 
             d:DesignHeight="544" d:DesignWidth="1444" Loaded="UserControl_Loaded" Width="Auto" Height="Auto">
    <DockPanel>
		<Grid Margin="0" DockPanel.Dock="Top" Height="0" Visibility="Collapsed">
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="*" />
				<ColumnDefinition Width="*" />
				<ColumnDefinition Width="*" />
				<ColumnDefinition Width="*" />
			</Grid.ColumnDefinitions>
			
			<StackPanel Grid.Column="0">
				<Label Content="Choose Report" Margin="0,0,28.773,0" x:Name="label1" Foreground="White" FontSize="9.333"  d:LayoutOverrides="Width, VerticalMargin"  />
				<ComboBox Margin="0" x:Name="cboReports" >
					<ComboBoxItem Content="Servers and services" />
					<ComboBoxItem Content="Databases and files" />
					<ComboBoxItem Content="Index Fragmentation" />
					<ComboBoxItem Content="SQL Agent Jobs" />
					<ComboBoxItem Content="Unused Non Clustered Indexes" />
				</ComboBox>
			</StackPanel>
			<Button     Grid.Column="3"                 
				HorizontalAlignment="Left" 
				Margin="0" 
				x:Name="btnShowReport" 
				VerticalAlignment="Top" 
				Width="37"
				Height="34"
				
				
				ToolTip="Show Report"  Grid.Row="0">
				<Image Width="38" Height="32" Source="Images\reports.png" />
			</Button>
			<StackPanel Grid.Column="1">
				<Label Content="Instance" Margin="0" x:Name="label2" Foreground="White" FontSize="9.333"  d:LayoutOverrides="VerticalMargin"  />
				<ComboBox
					x:Name="cboInstances" 
					Margin="0" 
				         
					DisplayMemberPath="InstanceName"            
					SelectedValuePath="ServiceID"            
					ItemsSource="{Binding}" />
			</StackPanel>
			<StackPanel Grid.Column="2">
				<Label Content="Database" Margin="0" x:Name="label3" Foreground="White" FontSize="9.333"   BorderBrush="{x:Null}" />
				<ComboBox
					x:Name="cboDatabases" 
					DisplayMemberPath = "DatabaseName"
					SelectedValuePath = "DatabaseID"
					ItemsSource="{Binding}" Margin="0" />
			</StackPanel>
		</Grid>
		<Border DockPanel.Dock="Bottom" BorderBrush="Black" BorderThickness="1" Margin="0" CornerRadius="0" Background="White">
			<WindowsFormsHost x:Name="wfh_report" Margin="5">
				<viewer:ReportViewer ProcessingMode="Local" BorderStyle="None" Name="rpt" Visible="true" ShowToolBar="True" ZoomMode="PageWidth"/>
			</WindowsFormsHost>
		</Border>
	</DockPanel>
</UserControl>
